<div class="p-head">
    <b class="c3"><?= $bill_title ?></b>
    <div class="r">

    </div>
    <div id="desc">
        <?= isset($familyinfo['name']) ? $familyinfo['name'] . ($familyinfo['desc'] ? " - " . $familyinfo['desc'] : '') : '记录每天生活的点点滴滴。。。' ?>
    </div>
</div>

<div style="width:100%;margin-bottom:10px;overflow:hidden;">
    <table class="data list" cellpadding="0" cellspacing="1" width="100%" class="l" style="margin-bottom:0;">
        <tbody>
            <?php foreach ($list as $m => $n) { ?>
                <tr style="background:#f3f3f3;">
                    <td>
                        <a href="/mobile/bill/edit/<?= $n['id'] ?>/" class="ajax">
                            <span class="l"><?= $n['type'] == 'expense' ? '<font color=red>支出</font>' : '<font color=green>收入</font>' ?> <?= $n['amount'] ?></span>
                        </a>
                    </td>
                    <td></td>
                    <td>
                        <span class="r"><?= date("Y-m-d", $n['occurtime']) ?></span>
                    </td>
                </tr>
                <tr class="ajax" style="color:#888;">
                    <td class="l"><?= $n['father_category']['name'] ?> - 
                        <?= $n['category']['name'] ?></td>
                    <td><?= $n['account']['name'] ?></td>
                    <td class="r"><?= $n['memo'] ?></td>
                </tr>
            <?php } ?>
            <tr>
                <td colspan="6" style="padding:0;">
                    <div class="pager graybg ajax">
                        <?= $pagelist ?> 
                    </div>
                </td>
            </tr>
        </tbody>
    </table>
</div>

<script type="text/javascript">
    KS.common.load('bill.index');
</script>